//
//  MJGridView.h
//  MJGridView
//
//  Created by Jarvis on 2023/9/8.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


//typedef NS_ENUM(NSInteger, MJGridViewType) {
//    MJGridViewTypePlain = 0,
//    MJGridViewTypeGroup,
//};
@interface MJGridView : UIView
// 内边距
@property (nonatomic, assign) UIEdgeInsets insets;

// 行间距
@property (nonatomic, assign) CGFloat rowSpacing;

// 列间距
@property (nonatomic, assign) CGFloat columnSpacing;

// 列
@property (nonatomic, assign) NSInteger column;

// 行高
@property (nonatomic, assign) CGFloat rowHeight;

// 样式
// @property (nonatomic, assign) MJGridViewType type;

@property (nonatomic, copy  ) NSInteger(^number)(void);

@property (nonatomic, copy  ) UIView *(^itemView)(MJGridView *view, NSInteger index);

//- (void)number:(NSInteger(NS_NOESCAPE ^)(void))block;
//- (void)itemView:(UIView *(NS_NOESCAPE ^)(MJGridView *view, NSInteger index))block;
- (void)registerView:(NSString *)className identifier:(NSString *)identifier;
- (UIView *)dequeueItemWithIdentifier:(NSString *)identifier;
- (void)reloadData;

@end

NS_ASSUME_NONNULL_END
